System, method and apparatus for improving the performance of collective operations in high performance computing

ABSTRACT

System, method, and apparatus for improving the performance of collective operations in High Performance Computing (HPC). Compute nodes in a networked HPC environment form collective groups to perform collective operations. A spanning tree is formed including the compute nodes and switches and links used to interconnect the compute nodes, wherein the spanning tree is configured such that there is only a single route between any pair of nodes in the tree. The compute nodes implement processes for performing the collective operations, which includes exchanging messages between processes executing on other compute nodes, wherein the messages contain indicia identifying collective operations they belong to. Each switch is configured to implement message forwarding operations for its portion of the spanning tree. Each of the nodes in the spanning tree implements a ratcheted cyclical state machine that is used for synchronizing collective operations, along with status messages that are exchanged between nodes. Transaction IDs are also used to detect out-of-order and lost messages.

BACKGROUND INFORMATION

High-performance computing (HPC) has seen a substantial increase inusage and interests in recent years. Historically, HPC was generallyassociated with so-called “Super computers.” Supercomputers wereintroduced in the 1960s, made initially and, for decades, primarily bySeymour Cray at Control Data Corporation (CDC), Cray Research andsubsequent companies bearing Cray's name or monogram. While thesupercomputers of the 1970s used only a few processors, in the 1990smachines with thousands of processors began to appear, and more recentlymassively parallel supercomputers with hundreds of thousands of”“off-the-shelf” processors have been implemented.

In an HPC environment, large numbers of computing systems (e.g., bladeservers or server modules) are configured to work in parallel to solvecomplex tasks. Each server may include one or more processors withassociated resources (e.g., local memory for each processor), whereineach processor is operated as a compute “node.” The servers typicallyoperate within a collective group called a cluster to perform acollective operation. For more complex tasks, clusters of servers may beconfigured in an HPC cluster hierarchy or the like, with each clusterdedicated to performing a subtask of the overall complex task.

Various types of network topologies and protocols may be used tointerconnect nodes in an HPC environment, with the most commonly usedinterconnects employing InfiniBand or Ethernet. In a typical HPC use ofInfiniBand, the compute nodes run processes that use an ApplicationProgramming Interface (API) to exchange data and results with otherprocesses running on other nodes. Examples of these APIs include MessagePassing Interface (MPI), Symmetric Hierarchical Memory Access (SHMEM),and Unified Parallel C (UPC). In particular, these processes use a classof operations called “Collectives,” which are used to enablecommunication and synchronization between multiple processes on multiplenodes.

These Collective operations require communication between multiplecomputers in the HPC cluster. As the number of processes involved in theoperations grows, the number of additional messages needed to handlepossible errors and to synchronize the processes also grows. Inaddition, the Collective operations are unaware of the physical topologyof the interconnect network. These two factors create inefficienciesthat degrade the performance of the HPC cluster, causing computations totake longer to complete.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing aspects and many of the attendant advantages of thisinvention will become more readily appreciated as the same becomesbetter understood by reference to the following detailed description,when taken in conjunction with the accompanying drawings, wherein likereference numerals refer to like parts throughout the various viewsunless otherwise specified:

FIG. 1 is a block diagram illustrating an exemplary system forimplementing aspects of various embodiments disclosed herein;

FIG. 2 is a block diagram of a switch that may be used for one or moreof switches shown in the system of FIG. 1;

FIG. 3 is a block diagram of a subnet of an HPC network environmentcomprising multiple compute nodes interconnected via switches and links;

FIG. 3 a shows a first spanning tree formed from nodes in the subnet ofFIG. 3, including compute Nodes D, E, F, G, H, and I and three switches;

FIG. 3 b shows a second spanning tree formed from nodes in the subnet ofFIG. 3, including compute Nodes A, B, C, D, E, F, G, H, I, J, K, and L,and five switches;

FIG. 4 is a flowchart illustrating operations for setting up acollective operation, according to one embodiment;

FIG. 5 is a diagram illustrating a state machine comprising a 4 statecyclical ratchet;

FIG. 6 a is a diagram illustrating the states of nodes in the spanningtree of FIG. 3 a over multiple stages implemented in connection withentering a Barrier operation;

FIG. 6 b is a diagram illustrating the states of nodes in the spanningtree of FIG. 3 a over multiple stages when performing a releaseoperation;

FIG. 7 is a flowchart illustrating operations performed at various nodesin the spanning tree to facilitate collective operations, according toone embodiment;

FIG. 8 is a flowchart illustrating operations for implementingtransaction ID states, according to one embodiment;

FIGS. 9 a, 9 b, 9 c, 9 d, 9 e, 9 f, and 9 g illustrate the state machinestates and transaction ID states of nodes in the spanning tree of FIG. 3b as a Barrier operation is being entered and completed;

FIGS. 10 a, 10 b, and 10 c illustrate the state machine states andtransaction ID states of a sub-tree in connection with handlingout-of-order operations and lost messages; and

FIG. 11 is a graph illustrating a modeled performance comparison betweenan existing MPI implementation using an HPC cluster and an offloadedBarrier implementation using a similar HPC cluster

DETAILED DESCRIPTION

Embodiments of systems, methods, and apparatus for improving theperformance of collective operations in High Performance Computing aredescribed herein. In the following description, numerous specificdetails are set forth to provide a thorough understanding of embodimentsdisclosed and illustrated herein. One skilled in the relevant art willrecognize, however, that the invention can be practiced without one ormore of the specific details, or with other methods, components,materials, etc. In other instances, well-known structures, materials, oroperations are not shown or described in detail to avoid obscuringaspects of the invention.

For clarity, individual components in the Figures herein may also bereferred to by their labels in the Figures, rather than by a particularreference number. Additionally, reference numbers referring to aparticular type of component (as opposed to a particular component) maybe shown with a reference number followed by “(typ)” meaning “typical.”It will be understood that the configuration of these components will betypical of similar components that may exist but are not shown in thedrawing Figures for simplicity and clarity or otherwise similarcomponents that are not labeled with separate reference numbers.Conversely, “(typ)” is not to be construed as meaning the component,element, etc. is typically used for its disclosed function, implement,purpose, etc.

FIG. 1 is a block diagram illustrating an exemplary system 100 forimplementing aspects of various embodiments disclosed herein. In oneembodiment, system 100 includes a plurality of computing system 102a-102 g (which may also be referred to herein as computing system 102,compute node or simply node) linked in communication with one anothervia a plurality of switches 104, 106, 108, 110, 112, and 114 and networklinks 116. System 100 includes a subnet manager (SM) 118 executing amanagement application 120 on a processor 122, described below infurther detail. There may be other systems/components that may be placedbetween the aforementioned components but they are not germane to theembodiments disclosed herein. It is noteworthy that the embodimentsdisclosed herein are not limited to any particular number of computersor switches, but rather the numbers shown are merely for illustrativepurposes.

Details of one embodiment of a computing system 102 are shown forcomputing system 102 a. Each computing system 102 include a centralprocessing unit 124 that may include one or more processors 126 a-126 nconnected to other components in the computing system via one or moreinterconnects, depicted as an interconnect 128 for simplicity.Alternatively, processors 126 a-126 n may represent cores in amulti-core processor, or processors 126 a-126 n may comprise separateCPUs in a multi-socketed computer system. Generally, CPU 124 maycomprise one or more programmable general-purpose or special-purposemicroprocessors, digital signal processors (DSPs), programmablecontrollers, application specific integrated circuits (ASICs),programmable logic devices (PLDs), or the like, or a combination of suchhardware devices.

Interconnect 128 may comprise one or more of a system bus, a PeripheralComponent Interconnect (PCI) bus or PCI Express (PCIe) interconnect, aHyperTransport or industry standard architecture (ISA) bus, a SCSI bus,a universal serial bus (USB), an Institute of Electrical and ElectronicsEngineers (IEEE) standard 1394 bus (sometimes referred to as“Firewire”), or any other type of interconnect system. Additionally,Interconnect 128 may comprise an interconnect fabric, such as an INTEL®QuickPath Interconnect™ fabric, an INTEL® On-Chip Scalable Fabric(IOSF), as well as other fabric-based interfaces including the Open CoreProtocol (OCP), and ARM's AMBA (Advanced Microcontroller BusArchitecture) interface.

Computing system 102 may also include a storage device 130, which maycomprise a hard disk (magnetic, optical, or Solid State Drive (SSD)), aCD-ROM or DVD drive, a non-volatile memory device (flash or memorystick) or any other type of storage device. Storage device 130 may storeprocessor executable instructions and data, for example, operatingsystem modules and components, application modules and data files, andother files. In one embodiment, some of these files are stored atstorage device 130 using an installation program or the like.

Computing system 102 also includes a memory 132, which is generallyrepresentative of one or more types of memory, such as random accessmemory (RAM), and/or read only memory (ROM). Generally, when executingstored computer-executable instructions from storage device 130, CPU 124may load the instructions into memory 132 and retrieve the instructionsfrom memory for execution. Optionally, all or a portion of theinstructions may be downloaded from a network and loaded into memory132.

Computing system 102 may also include other devices and interfaces 133,which may include a display device interface, a keyboard interface, apointing device interface and others. In some embodiments, computersystem 102 is a blade server or server module or the like, which doesn'tdirectly interface with a keyboard, pointing device, or similar userinterface, and may not include a display device interface.

Computing system 102 also includes an IO (Input-Output) interface 134that is coupled to a network adapter 136 via a link 138. For example, IOinterface 134 may comprise a peripheral bus interface comprising one ormore of a PCI, PCI-X or PCIe interface that is connected to networkadapter 136 via a PCI, PCI-X or PCIe interconnect. Optionally, any othertype of IO interface and associated interconnect may be used. Generally,network adapter 136 may be configured to handle network and/or storagetraffic using various network and storage protocols. Some commonprotocols are described below.

InfiniBand (“IB”) is an industry standard typically used with computingsystems and input/output (I/O) devices. The IB standard is used tocreate fabrics, which may encompass numerous (for example thousands) ofinterconnected hosts/switches/servers, all working in parallel to solvecomplex problems. A typical IB network includes a plurality of switcheslinked to each other or to one or more computing systems. An IB networkis often used in a high performance computing environment environments.

Another common network protocol is Ethernet. Various Ethernet standardsare defined by IEEE under 802.3-related specifications. The originalEthernet bus or star topology was developed for local area networks(LAN) to transfer data at 10 Mbps (Mega bits per second). More recently,Ethernet standards have been developed by various IEEE 802.3 workinggroups for 10 Gbps (Gigabits per second, also referred to as 10 GigabitEthernet or 10G Ethernet), 40 Gbps (40G Ethernet), and 100 Gbps (100GEthernet). Ethernet links operating at speeds of 10 Gbps and above aresometimes referred to as high-speed Ethernet links, and such links arecommonly deployed in HPC architectures.

A common storage network protocol used to access storage systems isFibre Channel. Fibre channel is a set of American National StandardsInstitute (ANSI) standards that provide a serial transmission protocolfor storage and network protocols such as HIPPI, SCSI, IP, ATM andothers. Fibre channel supports three different topologies:point-to-point, arbitrated loop and fabric. The point-to-point topologyattaches two devices directly. The arbitrated loop topology attachesdevices in a loop. The fabric topology attaches host systems directly(via HBAs) to a fabric, which are then connected to multiple devices.The Fibre Channel fabric topology allows several media types to beinterconnected. Fibre Channel fabric devices include a node port or“N_Port” that manages Fabric connections. The N_port establishes aconnection to a Fabric element (e.g., a switch) having a fabric port orF_port.

A recently introduced standard, called Fibre Channel over Ethernet(FCoE) has been developed to handle both Ethernet and Fibre Channeltraffic in a storage area network (SAN). This functionality allows FibreChannel to leverage 10 Gigabit Ethernet networks at the physical layer,while preserving the Fibre Channel protocol.

It is noteworthy that the present embodiments are not limited to anyparticular protocol. Rather, the principles and techniques disclosed inthe embodiments herein may be implemented using various protocols,including both existing standardized protocols, future standardizedprotocols, and existing and future proprietary protocols.

As described above, switches 104, 106, 108, 110, 112, and 114 enablecommunication between various components of system 100 includingcomputing systems 102 a-102 g and subnet manager 118. As an example, aport 104 a of switch 104 is coupled to network adapter 136, while a port104 b is coupled to port 106 a of switch 106. Another port 106 b ofswitch 106 is coupled to a network adapter 136 b of computer system 102b. In addition, various other ports on switches 104, 106, 108, 110, 112,and 114 are used to interconnect the various system 100 components incommunication via network links 116.

The various interconnect links describe above and shown in FIG. 1 are anexample of a network system having a plurality of switches. Theembodiments disclosed herein are not limited to any particular number ofswitches, ports, adapters or other network devices.

The various switch ports illustrated for switches 104, 106, 108, 110,112, and 114, may include logic and circuitry for facilitating receiptand forwarding of traffic using one or more network protocols. In oneembodiment, the various ports are configured to process informationcomplying with the IB standard. In other embodiments, the ports areconfigured to facilitate transfer of packetized traffic using anEthernet protocol. In still other embodiments, a proprietarynon-standard protocol may be supported. In addition, in some embodimentsone or more of switches 104, 106, 108, 110, 112, and 114 may beconfigured to support a network gateway function, enabling trafficreceived using a given protocol to be forwarded out of a switch portusing a different protocol.

In one embodiment, subnet manager 118 may be a computing system similarto computing systems 102 a-102 g described above. For example, subnetmanager 118 includes one or more processors 122 that has access to amemory 138 and one or more storage devices (not shown). Processor 122executes management application 120 to enable subnet manager 118 toconfigure various components of system 100, such as switches 104, 106,108, 110, 112, and 114.

In one embodiment, management application 120 includes or is a subnetmanager (SM) provided by the IB standard. The IB standard also specifiesa Subnet Management Agent (SMA) that implements a SMA protocol, which isused by management application 120 to communicate with computing systems102 a-102 g and various switches used in system 100. For convenience andsimplicity, SM and SMA may be used herein to generally apply tocomponents configured to support similar subnet manager and SubnetManagement Agent functionality that may be implemented for othernetworking protocols in addition to IB.

Computing systems 102 a-102 g may concurrently execute one or moreapplications 140. Examples of applications that are represented byapplications 140 include storage applications (for example, Network FileSystem (NFS), Lustre File System provided by Sun Microsystems Inc.; orGeneral Parallel File System (“GPFS”) provided by IBM Corporation),network applications (for example, Secure Shell (SSH) applications,TELNET (a network protocol used the Internet and Local Area Networks)applications and/or Web servers), computing applications (for example,MPI (Message Passing Interface) applications such as LS-Dyna, anadvanced general-purpose multiphysics simulation software packagedeveloped by the Livermore Software Technology Corporation (LSTC); orFluent (a computational fluid dynamics software, developed by FluentInc.) and others.

MPI is often used in a HPC environment by computing systems to exchangedata and results. Computing processes use a class of operations, called“Collectives” to enable communication between various processes executedby a plurality of computing systems. As the number of processes increasein a HPC environment, the number of messages to handle error conditionsalso increases.

As discussed above, conventional collective operations have challengesas the number of processes continues to increase. For example,collective operations in conventional systems are unaware of the networktopology and messages are passed around like any other standard networkmessage. Under the embodiments described herein, messages forfacilitating collective operations are implemented in a more intelligentand efficient manner. This is facilitated, in part, by collective statemachine (CSM) logic 142 and application program interface (API) 144,which are provided for coordinating and routing operations within acollective group, as described below in further detail.

FIG. 2 shows a block diagram of a switch 200 that may be used for one ormore of switches 104, 106, 108, 110, 112, and 114 of FIG. 1. Switch 200includes n ports 202 a-202 n, which are generally referred to herein asa port 202. Each port 202 includes in input port ‘I’ and an output port‘O’. Ports 202 a-202 n are each connected to a crossbar 204, which isused to depict interconnect circuitry within switch 200 to enable datato be forwarded between input and output ports of switches 202 a-202 n.It is noted that in addition to the interconnect circuitry, variousbuffers and other logic (both not shown) are implemented within switch200 to facilitate various aspects of network switch operations, as willbe recognized by those skilled in the networking arts. These operationsare further facilitated through the use of a processor 206, memory 208,and CSM logic 210. Generally processor 206 is illustrative of varioustypes of processors, including single core and multi-core generalpurpose or special-purpose processors, as well as embedded processors.While memory 208 is shown as a single block, it may be distributed. Inaddition, memory address ranges in memory 208 comprise one or morememory-mapped IO (MMIO) address spaces used by switch 200.

As further shown in FIG. 2, each of ports 202 a-202 n is connected to arespective port 212 a-212 n on a respective node 214 a-214 n via arespective link 216 a-216 n. Each of these nodes is representative ofanother component in system 100, such as another switch, computersystem, or subnet manager.

FIG. 3 depicts a system 300 comprising a 12 compute nodes 102 a-102 l(also labeled Node A-Node L) and an SM 302 interconnected via fiveswitches 200 a-200 e and network links 216 forming a network meshcommonly referred to as a “fabric.” Generally, traffic (e.g., MPImessages) may be sent from any of the compute nodes to any other computenode via one or more routed paths (routes). For example, Node A may sendtraffic to any of Nodes J, K or L via three different paths, eachtraversing three switches (e.g., via switches 200 a, 200 c and 200 e).Meanwhile, there is only one route between pairs of nodes for Nodes A,B, and C (all via switch 200 a). Also note there are several loopsformed by switches 200 a-200 e and links 302 connecting these switchesto one another.

FIG. 4 shows a flowchart 400 illustrating operations for setting up acollective group, according to one embodiment. Following the start ofthe process depicted by a start block 402, the process proceeds to ablock 404 in which the MPI application processes launch on nodes acrossthe fabric. In a block 406, an MPI process on a given nodes recognizesit is part of a set or subset of the processes that make up the MPIapplication one that node. In a block 408, the MPI process registerswith its local Master Process its membership in this set or subset.Included in this registration is a list of all of the other processesthat are part of the set or subset.

Next, in a block 410, each local Master Process notifies the SM (e.g.,SM 302) that the compute node (hosting that Master Process) is joiningthe collective group, along with sending the registration informationcorresponding to the set or subset of MPI application processesexecuting on the compute node. As shown in FIG. 3 a, in a first examplethe compute nodes that will be participating in the collective group areNodes D, E, F, G, H, and I. In response to registration, SM 302 returnsa Collective Group identified (CGID) to the Master Process, whichdistributes the CGID to the other processes in the set or subset ofprocesses executing on that compute node.

Next, in a block 414, SM 302 determines a spanning tree including thecompute nodes that have joined the collective group, switch nodes(switches) used to interconnect the compute nodes, and routes thecollective group will use. In some instances, the spanning tree is builtas a new tree, which will involve determining the network topology forat least the portion of the network including the compute nodes thathave joined the collective group. Techniques for determining networktopology are well known, and include next neighbor propagation (eachnode and switch exchanges link and port configuration information withits neighbor and then propagates that to other neighbors), link pathtracing, and use of a centralized link management approach where eachnode and switch forwards its port configuration information, enabling acentral management entity to determine the network topology. In oneembodiment, each switch sends its local port configuration informationto SM 302. In addition to building a spanning tree from scratch, anexisting spanning tree may be expanded when registration information isreceived from a new compute node that isn't already in the existingspanning tree.

The spanning tree is derived from principles used by the Spanning TreeProtocol (STP). STP is a network protocol that ensures a loop-freetopology for any bridged Ethernet Local Area Network (LAN). Under itsoriginal conventional usage, STP was implemented to prevent bridge loopswhile concurrently ensuring all LAN or network segments remainaccessible via any node in the network. STP also allows a network designto include spare (redundant) links to provide automatic backup paths ifan active link fails, without the problem of bridge loops, or the needfor manual enabling/disabling of these backup links. The standardimplementation of STP is defined in the IEEE standard 802.1D-2004.

To visualize operation of STP, the network topology is depicted as agraph whose nodes are bridges that are coupled to LAN segments usingnetwork links having corresponding interfaces (i.e., ports) at eachconnection. In the context of this disclosure, rather than bridges andLAN segments, the network topology comprise compute nodes 102 a-1021, SM302, and switches 200 a-200 e, which comprise the switch nodes, andlinks 116.

The objective is similar to the purpose of the standard STP—to removeloops. At the same time, this removes any redundant routes, such thateach compute node and switch node participating in the collective groupmay only access another compute or switch node via a single specifiedroute. Under the embodiments herein, general principles of the standardSTP are implemented, but use of the specific protocols and messages neednot be implemented. Rather, similar techniques may be used. For example,Bridge Protocol Data Unit (BPDU) frames specified in IEEE standard802.1D-2004 for Ethernet STP may be replaced by messages providingsimilar data.

In one embodiment, there are two types of member in the spanning tree:Local Roots and Switches. The compute nodes operate as the Local Roots,and such terms may generally be used interchangeably. Both types ofmembers share the same basic features. First, all members of thespanning tree will have at least one child. The children of the LocalRoots are the actual MPI processes executing on the compute nodes, whichare not considered part of the spanning tree. The children of theswitches are other switches, or Local Roots. Second, all members of thespanning tree will have a parent in the tree, except for the root of theentire tree, which will comprise a core switch. Each member will alsohave a collective state machine and logic for implementing a transactionID, as described below.

The result of the spanning tree operation is shown in FIG. 3 a, whereinthe nodes and links in the spanning tree are shown in bold, and includeNodes D, E, F, G, H, and I, and switches 200 b, 200 c, and 200 d. Asdiscussed above, a spanning tree is configured such that each node mayonly access any other node through a single path, and there are nopotential loops. The other Nodes A, B, C, J, K and L, as well asswitches 200 a and 200 e are shown in dashed outline. These computenodes and switches and the links connecting them still exist; however,they are not participants in either the collective group or the spanningtree for the collective group.

As shown in FIGS. 6 a and 6 b, switches 200 b and 200 d are edgeswitches that are respectively relabeled “Edge 1” and “Edge 2,” whileswitch 200 c is a core switch relabeled “Core.” Generally, an edgeswitch will be connected to one or more compute nodes, while a coreswitch will not be connected to any compute nodes. For larger networks,there may be a large number of core switches, which may also be referredto as internal switches. The spanning tree paths may be selectedaccording to various criteria, such as the shortest possible paths,least congested paths, highest bandwidth paths, or combinations thereof.

In a block 416, SM 302 notifies the switches that they are members ofthe collective group for processing messages regarding the collectivetask and which of their ports are connected to other members of thecollective group. In one embodiment, the SM sends configurationinformation that includes a collective forwarding table describing theswitch's parent node and child nodes. This enables the switches torecognize messages for the collective group. As an example, the membersof the collective group may be given a unique collective groupidentifier (e.g., the CGID returned in block 412), which may be embeddedin messages (e.g., in message headers) sent between group members toidentify those messages as belonging to the collective group. Inaddition, the switches forwarding the messages use the collective groupidentifier to recognize the messages as being part of the collectivegroup.

Each member of the Collective Group has a state machine associated withit, referred to herein as the Collective state machine or CSM. The CSMdefines the behavior of that member when it receives a CollectiveOffload packet. In one embodiment, CSMs for compute nodes areimplemented in software, while CSMs for switches are implemented inhardware. For example, state machines may be implemented in hardware viaembedded logic or the like using well-known techniques. Optionally, aCSM may be implemented through software or firmware executing on anembedded processor or the like.

In one embodiment, each CSM is configured to implement the following:

-   -   A flag indicating if the state machine is running or stopped        (paused).    -   A flag indicating if the state machine has failed.    -   A list of switch ports that are linked to the switch's children        in the Collective Group spanning tree.    -   A method to indicate whether each switch port is In or Out of        the current barrier.    -   Which switch port is linked to the switch's parent in the        spanning tree, or if the switch is the root of the spanning        tree.    -   A 2-bit transaction id to detect lost packets.    -   The current machine state.    -   The current collective offload operation (e.g., barrier)    -   A configurable delay for throttling how often Ack Requests can        be forwarded to the switch's parent in the spanning tree.

The operation of the state machine varies depending on the operationbut, abstractly they can all be thought of as a cyclical ratchetingmechanism with 4 states: Idle, Filling, Full and Exiting and one errorflag, Failure.

FIG. 5 shows an example of CSM 142 for tracking progress of collectiveoperations, according to one embodiment. CSM 142 is executed by thecomputing systems participating within a collective group and thenetwork switches used for communication among the members of thecollective group. CSM 142 has a plurality of states/stages thattransition in the anti-clockwise direction, like a ratchet. The firststate is an Idle state 500. The next state is a Filling state 502 when acollective group member makes a valid request to begin a collectiveoperation. CSM 142 stays at this state until all the member's childrenhave requested the collective operation. The term “children” in thiscontext means a switch or compute node below a member in a hierarchicalstructure, for example, in the spanning tree illustrated in FIGS. 6 aand 6 b that is described below in more detail. Thereafter, the CSM CSM142 moves to the “Full” state 504.

If a member is a “root” member of a spanning tree and completes thecollective operation, it moves to an Exit state 506. If a member is nota root member, then it sends a request to its parent, notifying theparent that the member is ready to exit. The term “parent” in thiscontext means a switch that is higher than the member in a hierarchicalstructure, for example, in a spanning tree described below. The membersthen waits for its parent to tell it to move to the exit state. Once inthe exit state, the member notifies its children that they should alsomove to the exit state and then moves from Exit state 306 to Idle state300.

FIG. 6 a shows an example of a spanning tree where a plurality of nodes(or computing systems) are involved to perform a collective operation.As an example, the collective operation may be a “barrier” operation.The term barrier operation means an operation where every member (orcompute node) within a collective group waits until all members havereached the same state. In other words, each machine stops and waitsuntil it is told that all systems are ready to progress. The spanningtree in FIGS. 6 a and 6 b are the same as depicted in FIG. 3 a (with theother nodes and links removed for clarity), and discussed above.

In FIG. 6 a, as the nodes enter the barrier operation, CSM 142 at eachnode moves from Idle state 500 to Filling state 502, and then to Fullstate 504. Once a node's CSM 142 reaches Full state 504, it notifies its“parent”—the switch to which it is connected. The switches' CSM 142 thentransition from Idle state 500 to Filling state 502. When all theparticipating nodes connected to the switch indicate that they are inFull state 504 the switch also moves to Full state 304. Thereafter, theswitch notifies its parent, which performs the same process. As anexample, the process for starting the barrier operation is shown in 5stages, which proceed as follows.

In stage 1, Nodes E, F, and I are in Filling state 502, while the restof the nodes and switches are all in Idle state 500. In stage 2, Nodes Eand F reach Full state 504, causing switch Edge 1 to move to Fillingstate 502, while Nodes G, H, and I independently reach Filling state502. In stage 3, Node G reaches Full state 504, causing switch Edge 2 totransition to Filling state 502. Node D independently transitions toFilling state 502. The Core switch continues to be in Idle state 502during the first three stages.

In stage 4, Node D reaches Full state 504, causing switch Edge 1 toreach Full state 504. This results in the Core switch moving to Fillingstate 502, while Node I independently reaches Full state 504. In stage5, all the Nodes D, E, F, G, H, and I, switches Edge 1 and Edge 2, andthe Core switch all in Full state 504. This means that every node in theCollective Group has entered the barrier operation.

FIG. 6 b shows the second half of the barrier operation, called the“release,” according to one embodiment. The release is also illustratedin five stages. At a high level, when the Core switch reaches Full state504, it progresses to Exit state 506 and then notifies switches Edge 1and Edge 2 of this transition. Switches Edge 1 and Edge 2 then forwardthat notification to each participating node, i.e., each of Nodes D, E,F, G, H, and I.

In stage 1, the Core switch is in Exit state 506. In stage 2, the Coreswitch enters Idle state 500, while switches Edge 1 and Edge 2 reachExit state 506. In stage 3, all of the switches are in Idle state 500,while each of Nodes D, E, F, G, H, and I is in Exit state 506. In stage4, only Nodes D, F, and G are in Exit state 506, while the rest of theCollective Group members are in Idle state 500. Thereafter, in stage 5,all the members are in the Idle state 500. Note that it is a feature ofthe CSM that it does not wait for children to verify that they havereceived a message.

FIG. 7 shows a flowchart 700 illustrating operations performed bymembers of a collective group to perform one or more tasks after thesetup operations of flowchart 400 have been performed. The processcontinues at a block 702 in which individual processes running on thecompute nodes initiate MPI collective operations. As illustrated in FIG.6 a and discussed above, the switches direct collective communicationsto other compute nodes (and other switches, as applicable) in thespanning tree, as shown in a block 704. Next, in a block 706, when theswitches have confirmed that the operation has completed, they notifythe participating computer nodes that the operation is complete. Alsohas before, this is performed by propagating messages from a core switchthrough edge switches to the computer nodes.

In a decision block 708, a determination is made to whether there areany more collective operations to be done to complete the task. If YES,the flowchart logic loops back to block 702 and the operations of blocks702, 704, and 706 are completed.

Once the collective operations have been completed, the answer todecision block 708 will be NO, and the logic will proceed to a block 710in which the processes notify the Master Process at each compute nodethat they are leaving the group. The Master Processes then notify the SMthat they are leaving the group, as shown in a block 712. In response ina block 714, the SM then notifies the switches that the group has beendestroyed.

If the fabric was perfect, coded perfectly and the system couldguarantee that no information would ever be lost, the use of collectivestate machines by themselves would be sufficient. However, this may notbe the case. Members of the spanning tree can fall behind other membersa number of ways, including lost packets, lengthy computations, packetcongestion and pulled cables.

Accordingly, in order to detect out-of-order or lost messages, in oneembodiment all collective offload state machines and all collectiveoffload messages have a short, 2-bit transaction ID, or “TID”. TheseTIDs are compared in a 2-bit modular manner necessary for errordetection: A TID of 0 is “less than” a TID of 1 or 2 but is greater thana TID with a value of 3.

An Exemplary Transaction ID Comparison Table is shown below in TABLE 1.

TABLE 1 B = 0 B = 1 B = 2 B = 3 A = 0 A == B A < B A < B A > B A = 1 A >B A == B A < B A < B A = 2 A > B A > B A == B A < B A = 3 A < B A > BA > B A == B

In this model, all members of a spanning tree begin with a transactionID of zero. When the first collective operation on that tree completesthe members, beginning with the root, increment the transaction ID. Inone embodiment, advancement of TIDs may be implemented via a cyclicalratcheted state machine similar to that used for the Collective statemachines (e.g., a 4 TID state ratchet).

An illustrative example of how a change in the transaction IDspropagates through the Collective Group is described in a flowchart 800of FIG. 8 and the diagrams in FIGS. 9 a-9 g. The Collective Groupmembers shown in the diagrams in FIGS. 9 a-9 g include all of thecompute nodes and switches of system 300, while the correspondingspanning tree 300 b is shown in FIG. 3 b. The compute nodes and switcheswill now be referred to by their reference numbers, and include computernodes 102 a, 102 b, 102 c, 102 d, 102 e, 102 f, 102 g, 102 h, 102 i, 102j, 102 k, an 1021, which are interconnected via switches edge switches200 a, 200 b, 200 d, and 200 e, core switch 200 c, and links 116. Coreswitch 200 c also operates as the root of the spanning tree.

The process begins in a block 802, wherein an initial transaction IDvalue of 0 is assigned to each member of the Collective Group when thegroup is created. This is shown in stage 1 of FIG. 9 a, where all thecomponents, running CSM 142 are assigned a transaction ID (t_id) of 0.In a block 804, a collective operation, for example, the barrieroperation begins. The operations begin from the edge of a spanning treeand are driven up the spanning tree as sub-trees are completed. Thestart of the operations is shown in stage 2 of FIG. 9 b, while and stage3 of FIG. 9 c shows two sub-trees having reached Full state 504.

As shown in a block 806, the release operation begins from the root ofthe tree, i.e. core switch 200 c. This is shown in stage 4 of FIG. 9 d,with core switch 200 c depicted in Exiting state 506. Once core switch200 c has completed exiting, it returns to Idle state 500 and its thetransaction ID is increased to 1. This is shown in FIG. 9 e, stage 5,where the transaction ID of core switch 200 c is increased to 1.

The transaction ID of the members is incremented as each node completesits exiting operation, as depicted in a block 808. This proceeds fromcore switch 200 c to the edge switches, and then to the compute nodes.As shown in stage 6 of FIG. 9 f, each of edge switches 200 a, 200 b, 200d, and 200 e have completing exiting and their transaction IDs haveincreased to 1.

The outward propagation continues until all nodes have returned to Idlestate 500 and their transaction IDs have been incremented to 1, as showin stage 7 of FIG. 9 g. Thereafter, in a block 910, the transaction IDfor the nodes is verified to ensure that they are have the sametransaction ID. FIG. 9 g depicts a stage 7 under which the transactionID for all nodes is 1, and the state of all nodes is idle state 500.

In one embodiment, by simply reviewing the transaction ID, one is ableto ascertain if a node is ahead or behind in performing a collectiveoperation. If any errors occur due to a node being ahead or behind, thetransaction IDs can be used to detect the error and then takeappropriate actions.

Because the Barrier Exit only flows from the top of the tree down, andthe transaction ID isn't incremented until the CSM of the spanning treeroot transitions from Exiting to Idle, we can assert that a member ofthe tree will never have a transaction ID greater than its parent'stransaction ID and that a child's transaction ID will be less than itsparent's transaction ID if and only if the message telling the child toexit the operation was lost. This permits errors of all sorts to beautomatically recovered, even if the recovery requires thereconstruction of the entire tree with different members. For example,consider the fragment of a spanning tree illustrated in FIGS. 10 a-10 c.

In stage 8, we see that one of the children is still working on an oldtransaction. Note that because all members of the tree must participatein all collective operations, and because they must participate in thesame order, transaction #1 cannot complete until the lagging childfinishes transaction #0 and advances to transaction #1. Therefore,lagging children can never be more than one step behind the rest of thetree. (And, for this reason, we only need transaction IDs from 0-3,repeating in a cyclical manner. Short of a coding error, it isimpossible for a child to use a transaction ID that differs from itsparent by more than a value of one.)

This condition will persist until the lagging child sends a request forstatus, or other offload operation, to its parent, as depicted in stage9. The parent, seeing that the child has an old transaction ID, discardsthe operation but then sends a response back to the child indicatingthat the old transaction has already completed, as depicted in stage 10.Since a lost Exit message is the only way for the child to have an olderid than the parent, this will cause the child to advance its own statemachine from Full to Exiting, increment its own transaction id andprepare it for the next collective operation.

The principles and techniques illustrated by way of the non-limitingembodiments disclosed herein provide substantial improvement overconventional Collective operations. As discussed above, existing MPIimplementations perform Collective operations without regard to thephysical arrangement of compute nodes on the network. This can lead toinefficient communication patterns where compute nodes that arephysically distant from each other communicating frequently and largeamounts of communication taking place over a single network link. Boththese situations will slow the Collective operation. As disclosedherein, such excess communication and traffic is reduced by organizingthe compute nodes and switches into a spanning tree and making the HPCapplications aware of that topology of the spanning tree, thus ensuringthat Collective communication will only occur between computer nodesthat are physically close together on the network and ensures thatmembers of the tree will never need to share a communications link.

FIG. 11 is a graph illustrating a modeled performance comparison betweenan existing MPI implementation using an HPC cluster and an offloadedBarrier implementation using a similar HPC cluster. As shown, asprocesses are increased under the existing MPI approach, the averagemessage latency increases at a slightly exponential rate. In contrast,increasing the number of processes under the offloaded Barrierimplementation results in a very small increase in average messagelatency, even when the number of processes are increased by severalorders of magnitude. Thus, as an HPC Collective operation increases insize (e.g., number of compute nodes and processes), the greater thebenefit of using the offloaded Barrier scheme.

While the use of an exemplary Barrier Collective operation is describedand illustrated herein, the teachings and principles of disclosed hereinmay be implemented for other types of Collective operations in a similarmanner. Moreover, the same switch may be a member of multiple spanningtrees. This is facilitated, in part, via the use of CGIDs in themessages transferred via the switches and exchanged between the spanningtree members.

Further aspects of the subject matter described herein are set out inthe following numbered clauses:

1. A method implemented in a high performance computing (HPC)environment including a plurality of compute nodes interconnected via aplurality of switches and links, the method comprising:

identifying a set of compute nodes from among the plurality of computenodes to participate in a collective group to perform collectiveoperations;

configuring a spanning tree comprising a plurality of nodes includingthe set of compute nodes and a set of switches interconnected by aplurality of links, the set of switches including edge switchesconnected to compute nodes and one or more levels of core switchesincluding a core switch at the root of the spanning tree, wherein thespanning tree is configured such that each node in the spanning tree isenabled to communicate with each of the other nodes via a singlerespective specified route comprising at least one link segment;

configuring each switch in the spanning tree to be aware of specifiedroutes involving that switch and one or more message identifiers to beincluded in collective operation messages used to perform the collectiveoperations; and

at each switch,

identifying collective operation messages and their destinations andforwarding the collective operations messages along link segments of thespecified routes connected to that switch.

2. The method of clause 1, further comprising employing the switches inthe spanning tree to monitor the progress of collective operations andensure the collective operations remain synchronized.

3. The method of clause 1 or 2, further comprising:

implementing a state machine at each node in the spanning tree;

exchanging state machine status messages between the nodes in thespanning tree; and

employing the state machine status messages and state machines tosynchronize collective operations performed by the collective group.

4. The method of clause 3, wherein the state machine at each node isimplemented as a cyclical ratchet under which states may only advanceone state at a time, the states including a first state, one or moremiddle states, and a last state, and wherein the state advances from thelast state back to the first state.

5. The method of clause 4, wherein the state machine states includes anidle state, a filling state, a full state, and an exiting state.

6. The method of any of the proceeding clauses, further comprising:

implementing a transaction Identifying (ID) mechanism at each node inthe collective group; and

employing transaction IDs to detect out-of-order or lost messages.

7. The method of any of the proceeding clauses, wherein the collectiveoperation comprises a Barrier operation.

8. The method of any of the proceeding clauses, further comprising:

initiating at least one application at each compute node in thecollective group;

identifying a master process at each compute node; and

notifying a subnet manager (SM) that the compute node is joining acollective group.

9. The method of any of the proceeding clauses, further comprising:

initiating collective operations via individual processes at the computenodes participating in the collective group;

forwarding messages between processes running on the compute nodes viathe switches in the spanning tree;

detecting that the collective operation has been completed; andnotifying the participating compute nodes the operation has beencompleted.

10. A system comprising:

a plurality of compute nodes, each including a processor, at least onenetwork port, and memory in which instructions are stored forimplementing one or more processes for facilitating a collectiveoperation;

a plurality of switches, each including a plurality of network ports,each switch linked in communication with at least one other switch via arespective link; at least a portion of the switches linked incommunication with a compute node, each switch including logic forimplementing a forwarding table;

a subnet manager (SM), having a processor, memory in which a subnetmanagement application configured to be executed on the processor isstored, and a network port linked in communication with a switch;

wherein execution of the instructions in the compute nodes and thesubnet management application by the SM performs operations including,sending information from compute nodes to the SM notifying the SM thatthe compute nodes are joining a collective group;

configuring, via the SM, a spanning tree comprising a plurality of nodesincluding the compute nodes in the collective group and a set ofswitches including edge switches connected to compute nodes and one ormore levels of core switches including a core switch at the root of thespanning tree, wherein the spanning tree is configured such that eachnode in the spanning tree is enabled to communicate with each of theother nodes via a single respective specified route comprising at leastone link segment;

-   -   configuring each switch in the spanning tree to be aware of        specified routes involving that switch and one or more message        identifiers to be included in collective operation messages used        to perform the collective operations; and

at each switch, identifying collective operation messages and theirdestinations and forwarding the collective operations messages alonglink segments of the specified routes connected to that switch.

11. The system of clause 10, wherein the switches are configured tomonitor the progress of collective operations and ensure the collectiveoperations remain synchronized.

12. The system of clause 10 or 11, wherein each node in the spanningtree is configured to:

implement a state machine;

-   -   exchange state machine status messages with adjacent nodes; and

wherein the nodes are configured to collectively employ the statemachine status messages and state machines to synchronize collectiveoperations performed by the collective group.

13. The system of clause 12, wherein the state machine at each node isimplemented as a cyclical ratchet under which states may only advanceone state at a time, the states including a first state, one or moremiddle states, and a last state, and wherein the state advances from thelast state back to the first state.

14. The system of clause 13, wherein the state machine states includesan idle state, a filling state, a full state, and an exiting state.

15. The system of any of clauses 10-14, wherein each node in thespanning tree is configured to implement a transaction Identifying (ID)mechanism, and wherein the nodes collectively are configured to employtransaction IDs to detect out-of-order or lost messages.

16. The system of any of clauses 10-15, wherein each compute node in thespanning tree is configured to:

initiate an application including one or more processes;

identify a master process; and notify the (SM) that the compute node isjoining a collective group.

17. The system of any of clauses 10-16, wherein the compute nodes in thespanning tree are configured to initiate collective operations viaindividual processes executing on the compute nodes and send messages toprocesses running on other computer nodes, and wherein the switches areconfigured to:

forward messages between processes executing on the compute nodes;

detect that the collective operation has been completed; and

notify the participating compute nodes the collective operation has beencompleted.

18. An apparatus configured to be implemented as a subnet manager in anetwork environment including a plurality of compute nodesinterconnected via a plurality of switches and links, the apparatuscomprising:

a processor;

-   -   a network adapter, operatively coupled to the processor having        at least one port; and

memory in which instructions comprising a management application arestored, wherein the instructions are configured to be executed on theprocessor to enable the apparatus, when the apparatus is linked incommunication with a switch in the network environment, to,

receive notifications from compute nodes indicating they are joining acollective group;

determine a spanning tree to be used for the collective group comprisinga plurality of nodes including the compute nodes providing notificationsindicating they are joining the collective group and a set of switchesincluding edge switches connected to the compute nodes and one or morelevels of core switches including a core switch at the root of thespanning tree, wherein the spanning tree is configured such that eachnode in the spanning tree is enabled to communicate with each of theother nodes via a single respective specified route comprising at leastone link segment; and

provide configuration information to each of the switches in thespanning tree for implementing message forwarding operations for theportion of the spanning tree that includes links coupled to that switch.

19. The apparatus of clause 18, wherein execution of the instructionsfurther enable the apparatus to:

receive network topology information from at least a portion of thecompute nodes and switches in the network environment; and

determine a network topology of at least a portion of the networkenvironment including all of the nodes in the spanning tree.

20. The apparatus of clause 18 or 19, wherein each node in a spanningtree other than the node that is the root of the spanning includes aparent node and at least one child node, and the configurationinformation provided to each switch includes a collective forwardingtable describing the switch's parent node and child nodes.

21. The apparatus of any of clauses 18-20, wherein execution of theinstructions further enables the apparatus to:

receive notification from compute nodes that they are leaving acollective group; and notify switches in the spanning tree that thecollective group has been destroyed.

22. A switch apparatus configured to be implemented as a switch in anetwork environment including a plurality of compute nodesinterconnected via a plurality of switches and links, the switchapparatus comprising:

a plurality of ports;

a processor; and

memory, operatively coupled to the processor; and

embedded logic configured to implement a state machine;

wherein the switch apparatus is configured to be implemented as a switchnode in a spanning tree including a plurality of compute nodes that aremembers of a collective group and running processes to implementcollective operations, and wherein the switch apparatus is furtherconfigured to,

receive configuration information including a collective forwardingtable describing the switch's parent node and child nodes in thespanning tree;

forward messages originating from sending compute nodes and destined fordestination compute nodes in accordance with the collective forwardingtable; and

exchange messages with adjacent nodes to ensure synchronization of thecollective operations.

23. The switch apparatus of clause 22, further comprising embedded logicfor implementing a ratcheted cyclical state machine, and wherein theswitch apparatus is further configured to:

update it's state machine state in response to applicable events; and

exchange state machine status messages with adjacent nodes in thespanning tree.

24. The switch apparatus of clause 22 or 23, wherein the switchapparatus is configured to be implemented as an edge switch in thespanning tree under which a plurality of the ports are linked torespective compute nodes.

25. The switch apparatus of any of clauses 22-24, wherein the switchapparatus is configured to be implemented as a core switch comprisingthe root of the spanning tree.

26. A non-transitory tangible machine-readable medium havinginstructions comprising a management application configured to beexecuted on an apparatus configured to be implemented as a subnetmanager in a network environment including a plurality of compute nodesinterconnected via a plurality of switches and links, wherein executionof the instructions enables the apparatus to:

receive notifications from compute nodes indicating they are joining acollective group;

determine a spanning tree to be used for the collective group comprisinga plurality of nodes including the compute nodes providing notificationsindicating they are joining the collective group and a set of switchesincluding edge switches connected to the compute nodes and one or morelevels of core switches including a core switch at the root of thespanning tree, wherein the spanning tree is configured such that eachnode in the spanning tree is enabled to communicate with each of theother nodes via a single respective specified route comprising at leastone link segment; and

provide configuration information to each of the switches in thespanning tree for implementing message forwarding operations for theportion of the spanning tree that includes links coupled to that switch.

27. The non-transitory tangible machine-readable medium of clause 26,wherein execution of the instructions further enable the apparatus to:

receive network topology information from at least a portion of thecompute nodes and switches in the network environment; and

determine a network topology of at least a portion of the networkenvironment including all of the nodes in the spanning tree.

28. The non-transitory tangible machine-readable medium of clause 26 or27, wherein each node in a spanning tree other than the node that is theroot of the spanning includes a parent node and at least one child node,and the configuration information provided to each switch includes acollective forwarding table describing the switch's parent node andchild nodes.

29. The non-transitory tangible machine-readable medium of any ofclauses 26-28, wherein execution of the instructions further enables theapparatus to:

receive notification from compute nodes that they are leaving acollective group; and

notify switches in the spanning tree that the collective group has beendestroyed.

Although some embodiments have been described in reference to particularimplementations, other implementations are possible according to someembodiments. Additionally, the arrangement and/or order of elements orother features illustrated in the drawings and/or described herein neednot be arranged in the particular way illustrated and described. Manyother arrangements are possible according to some embodiments.

In each system shown in a figure, the elements in some cases may eachhave a same reference number or a different reference number to suggestthat the elements represented could be different and/or similar.However, an element may be flexible enough to have differentimplementations and work with some or all of the systems shown ordescribed herein. The various elements shown in the figures may be thesame or different. Which one is referred to as a first element and whichis called a second element is arbitrary.

In the description and claims, the terms “coupled” and “connected,”along with their derivatives, may be used. It should be understood thatthese terms are not intended as synonyms for each other. Rather, inparticular embodiments, “connected” may be used to indicate that two ormore elements are in direct physical or electrical contact with eachother. “Coupled” may mean that two or more elements are in directphysical or electrical contact. However, “coupled” may also mean thattwo or more elements are not in direct contact with each other, but yetstill co-operate or interact with each other.

An embodiment is an implementation or example of the inventions.Reference in the specification to “an embodiment,” “one embodiment,”“some embodiments,” or “other embodiments” means that a particularfeature, structure, or characteristic described in connection with theembodiments is included in at least some embodiments, but notnecessarily all embodiments, of the inventions. The various appearances“an embodiment,” “one embodiment,” or “some embodiments” are notnecessarily all referring to the same embodiments.

Not all components, features, structures, characteristics, etc.described and illustrated herein need be included in a particularembodiment or embodiments. If the specification states a component,feature, structure, or characteristic “may”, “might”, “can” or “could”be included, for example, that particular component, feature, structure,or characteristic is not required to be included. If the specificationor claim refers to “a” or “an” element, that does not mean there is onlyone of the element. If the specification or claims refer to “anadditional” element, that does not preclude there being more than one ofthe additional element.

As discussed above, various aspects of the embodiments herein may befacilitated by corresponding software and/or firmware components andapplications, such as software running on a compute node or deviceprocessor or software and/or firmware executed by an embedded processoror the like, such as might be used on a switch. Thus, embodiments ofthis invention may be used as or to support a software program, softwaremodules, firmware, and/or distributed software executed upon some formof processing core (such as the CPU of a computer, one or more cores ofa multi-core processor), a virtual machine running on a processor orcore or otherwise implemented or realized upon or within acomputer-readable or machine-readable non-transitory storage medium. Acomputer-readable or machine-readable non-transitory storage mediumincludes any mechanism for storing or transmitting information in a formreadable by a machine (e.g., a computer). For example, acomputer-readable or machine-readable non-transitory storage mediumincludes any mechanism that provides (i.e., stores and/or transmits)information in a form accessible by a computer or computing machine(e.g., computing device, electronic system, etc.), such asrecordable/non-recordable media (e.g., read only memory (ROM), randomaccess memory (RAM), magnetic disk storage media, optical storage media,flash memory devices, etc.). The content may be directly executable(“object” or “executable” form), source code, or difference code(“delta” or “patch” code). A computer-readable or machine-readablenon-transitory storage medium may also include a storage or databasefrom which content can be downloaded. The computer-readable ormachine-readable non-transitory storage medium may also include a deviceor product having content stored thereon at a time of sale or delivery.Thus, delivering a device with stored content, or offering content fordownload over a communication medium may be understood as providing anarticle of manufacture comprising a computer-readable ormachine-readable non-transitory storage medium with such contentdescribed herein.

Various components referred to above as blocks, processes, or agent,described herein may be a means for performing the functions described.The operations and functions performed by various components describedherein may be implemented by software running on a processing element,via embedded hardware or the like, or any combination of hardware andsoftware. Such components may be implemented as software modules,hardware modules, special-purpose hardware (e.g., application specifichardware, ASICs, DSPs, etc.), embedded controllers, hardwired circuitry,hardware logic, etc. Software content (e.g., data, instructions,configuration information, etc.) may be provided via an article ofmanufacture including computer-readable or machine-readablenon-transitory storage medium, which provides content that representsinstructions that can be executed. The content may result in a computerperforming various functions/operations described herein.

As used herein, a list of items joined by the term “at least one of” canmean any combination of the listed terms. For example, the phrase “atleast one of A, B or C” can mean A; B; C; A and B; A and C; B and C; orA, B and C.

The above description of illustrated embodiments of the invention,including what is described in the Abstract, is not intended to beexhaustive or to limit the invention to the precise forms disclosed.While specific embodiments of, and examples for, the invention aredescribed herein for illustrative purposes, various equivalentmodifications are possible within the scope of the invention, as thoseskilled in the relevant art will recognize.

These modifications can be made to the invention in light of the abovedetailed description. The terms used in the following claims should notbe construed to limit the invention to the specific embodimentsdisclosed in the specification and the drawings. Rather, the scope ofthe invention is to be determined entirely by the following claims,which are to be construed in accordance with established doctrines ofclaim interpretation.

What is claimed is:
 1. A method implemented in a high performancecomputing (HPC) environment including a plurality of compute nodesinterconnected via a plurality of switches and links, the methodcomprising: identifying a set of compute nodes from among the pluralityof compute nodes to participate in a collective group to performcollective operations; configuring a spanning tree comprising aplurality of nodes including the set of compute nodes and a set ofswitches interconnected by a plurality of links, the set of switchesincluding edge switches connected to compute nodes and one or morelevels of core switches including a core switch at the root of thespanning tree, wherein the spanning tree is configured such that eachnode in the spanning tree is enabled to communicate with each of theother nodes via a single respective specified route comprising at leastone link segment; configuring each switch in the spanning tree to beaware of specified routes involving that switch and one or more messageidentifiers to be included in collective operation messages used toperform the collective operations; and at each switch, identifyingcollective operation messages and their destinations and forwarding thecollective operations messages along link segments of the specifiedroutes connected to that switch.
 2. The method of claim 1, furthercomprising employing the switches in the spanning tree to monitor theprogress of collective operations and ensure the collective operationsremain synchronized.
 3. The method of claim 1, further comprising:implementing a state machine at each node in the spanning tree;exchanging state machine status messages between the nodes in thespanning tree; and employing the state machine status messages and statemachines to synchronize collective operations performed by thecollective group.
 4. The method of claim 3, wherein the state machine ateach node is implemented as a cyclical ratchet under which states mayonly advance one state at a time, the states including a first state,one or more middle states, and a last state, and wherein the stateadvances from the last state back to the first state.
 5. The method ofclaim 4, wherein the state machine states includes an idle state, afilling state, a full state, and an exiting state.
 6. The method ofclaim 1, further comprising: implementing a transaction Identifying (ID)mechanism at each node in the collective group; and employingtransaction IDs to detect out-of-order or lost messages.
 7. The methodof claim 1, wherein the collective operation comprises a Barrieroperation.
 8. The method of claim 1, further comprising: initiating atleast one application at each compute node in the collective group;identifying a master process at each compute node; and notifying asubnet manager (SM) that the compute node is joining a collective group.9. The method of claim 1, further comprising: initiating collectiveoperations via individual processes at the compute nodes participatingin the collective group; forwarding messages between processes runningon the compute nodes via the switches in the spanning tree; detectingthat the collective operation has been completed; and notifying theparticipating compute nodes the operation has been completed.
 10. Asystem comprising: a plurality of compute nodes, each including aprocessor, at least one network port, and memory in which instructionsare stored for implementing one or more processes for facilitating acollective operation; a plurality of switches, each including aplurality of network ports, each switch linked in communication with atleast one other switch via a respective link; at least a portion of theswitches linked in communication with a compute node, each switchincluding logic for implementing a forwarding table; a subnet manager(SM), having a processor, memory in which a subnet managementapplication configured to be executed on the processor is stored, and anetwork port linked in communication with a switch; wherein execution ofthe instructions in the compute nodes and the subnet managementapplication by the SM performs operations including, sending informationfrom compute nodes to the SM notifying the SM that the compute nodes arejoining a collective group; configuring, via the SM, a spanning treecomprising a plurality of nodes including the compute nodes in thecollective group and a set of switches including edge switches connectedto compute nodes and one or more levels of core switches including acore switch at the root of the spanning tree, wherein the spanning treeis configured such that each node in the spanning tree is enabled tocommunicate with each of the other nodes via a single respectivespecified route comprising at least one link segment; configuring eachswitch in the spanning tree to be aware of specified routes involvingthat switch and one or more message identifiers to be included incollective operation messages used to perform the collective operations;and at each switch, identifying collective operation messages and theirdestinations and forwarding the collective operations messages alonglink segments of the specified routes connected to that switch.
 11. Thesystem of claim 10, wherein the switches are configured to monitor theprogress of collective operations and ensure the collective operationsremain synchronized.
 12. The system of claim 10, wherein each node inthe spanning tree is configured to: implement a state machine; exchangestate machine status messages with adjacent nodes; and wherein the nodesare configured to collectively employ the state machine status messagesand state machines to synchronize collective operations performed by thecollective group.
 13. The system of claim 12, wherein the state machineat each node is implemented as a cyclical ratchet under which states mayonly advance one state at a time, the states including a first state,one or more middle states, and a last state, and wherein the stateadvances from the last state back to the first state.
 14. The system ofclaim 13, wherein the state machine states includes an idle state, afilling state, a full state, and an exiting state.
 15. The system ofclaim 10, wherein each node in the spanning tree is configured toimplement a transaction Identifying (ID) mechanism, and wherein thenodes collectively are configured to employ transaction IDs to detectout-of-order or lost messages.
 16. The system of claim 10, wherein eachcompute node in the spanning tree is configured to: initiate anapplication including one or more processes; identify a master process;and notify the (SM) that the compute node is joining a collective group.17. The system of claim 10, wherein the compute nodes in the spanningtree are configured to initiate collective operations via individualprocesses executing on the compute nodes and send messages to processesrunning on other computer nodes, and wherein the switches are configuredto: forward messages between processes executing on the compute nodes;detect that the collective operation has been completed; and notify theparticipating compute nodes the collective operation has been completed.18. An apparatus configured to be implemented as a subnet manager in anetwork environment including a plurality of compute nodesinterconnected via a plurality of switches and links, the apparatuscomprising: a processor; a network adapter, operatively coupled to theprocessor having at least one port; and memory in which instructionscomprising a management application are stored, wherein the instructionsare configured to be executed on the processor to enable the apparatus,when the apparatus is linked in communication with a switch in thenetwork environment, to, receive notifications from compute nodesindicating they are joining a collective group; determine a spanningtree to be used for the collective group comprising a plurality of nodesincluding the compute nodes providing notifications indicating they arejoining the collective group and a set of switches including edgeswitches connected to the compute nodes and one or more levels of coreswitches including a core switch at the root of the spanning tree,wherein the spanning tree is configured such that each node in thespanning tree is enabled to communicate with each of the other nodes viaa single respective specified route comprising at least one linksegment; and provide configuration information to each of the switchesin the spanning tree for implementing message forwarding operations forthe portion of the spanning tree that includes links coupled to thatswitch.
 19. The apparatus of claim 18, wherein execution of theinstructions further enable the apparatus to: receive network topologyinformation from at least a portion of the compute nodes and switches inthe network environment; and determine a network topology of at least aportion of the network environment including all of the nodes in thespanning tree.
 20. The apparatus of claim 18, wherein each node in aspanning tree other than the node that is the root of the spanningincludes a parent node and at least one child node, and theconfiguration information provided to each switch includes a collectiveforwarding table describing the switch's parent node and child nodes.21. The apparatus of claim 18, wherein execution of the instructionsfurther enables the apparatus to: receive notification from computenodes that they are leaving a collective group; and notify switches inthe spanning tree that the collective group has been destroyed.
 22. Aswitch apparatus configured to be implemented as a switch in a networkenvironment including a plurality of compute nodes interconnected via aplurality of switches and links, the switch apparatus comprising: aplurality of ports; a processor; and memory, operatively coupled to theprocessor; and embedded logic configured to implement a state machine;wherein the switch apparatus is configured to be implemented as a switchnode in a spanning tree including a plurality of compute nodes that aremembers of a collective group and running processes to implementcollective operations, and wherein the switch apparatus is furtherconfigured to, receive configuration information including a collectiveforwarding table describing the switch's parent node and child nodes inthe spanning tree; forward messages originating from sending computenodes and destined for destination compute nodes in accordance with thecollective forwarding table; and exchange messages with adjacent nodesto ensure synchronization of the collective operations.
 23. The switchapparatus of claim 22, further comprising embedded logic forimplementing a ratcheted cyclical state machine, and wherein the switchapparatus is further configured to: update it's state machine state inresponse to applicable events; and exchange state machine statusmessages with adjacent nodes in the spanning tree.
 24. The switchapparatus of claim 22, wherein the switch apparatus is configured to beimplemented as an edge switch in the spanning tree under which aplurality of the ports are linked to respective compute nodes.
 25. Theswitch apparatus of claim 22, wherein the switch apparatus is configuredto be implemented as a core switch comprising the root of the spanningtree.